#include <iostream>
#include <string.h>
using std::cout;
using std::endl;

class A{
public:
      A(){};
      ~A(){
            cout << "del A" << endl;
      }
};


class B{
public:
      B(){};
      ~B(){
            cout << "del B" << endl;
      }
};

class C{
public:
      C(){};
      ~C(){
            cout << "del C" << endl;
      }
};

class D{
public:
      D(){};
      ~D(){
            cout << "del D" << endl;
      }
};

C c;
int main(){
    A *pa=new A();
    B b;
    static D d;   // 静态，但是局部
    delete pa;
    return 0;
}

/**
 * ~ a
 * ~ b
 * ~ d
 * ~ c
 * 
 */
